package fx;

import java.util.ArrayList;

/**
 * @author chihb
 * @create-time 2024/6/29 9:50
 * @description
 */
public class Test {
    public static void main(String[] args) {
        ArrayList<People> pl=new ArrayList<>();
        ArrayList<Student> sl=new ArrayList<>();
        ArrayList<D> d=new ArrayList<>();
        String s=A.test("sss");
        People p = new People();
        A.go(pl);
//        A.go(d);
        A.go(sl);


    }
}
//泛型类
class A<T>{
    private T name;

    public T getName() {
        return name;
    }

    public static <T> T test(T t){
        System.out.println("泛型方法");
        return t;
    }

//    public static <T extends People> void go(ArrayList<T> t){
//        System.out.println("T");
//    }
    public static void go(ArrayList<? extends People> t){  //? extends Car(上限)  ？ super Car(下限)
        System.out.println("T");
    }
}